package model.assessment;

import java.util.ArrayList;
import java.util.Objects;

public class Template {
    private String name;
    private String type;
    private ArrayList<String> questionUID;
    private String uid;
    private boolean isDeleted = false;

    public Template() {
    }

    public Template(String name, String type) {
        this.name = name;
        this.type = type;
    }

    public Template(String name, String type, ArrayList<String> questionUID,
                    String uid) {
        this.name = name;
        this.type = type;
        this.questionUID = questionUID;
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public ArrayList<String> getQuestionUID() {
        return questionUID;
    }

    public void setQuestionUID(ArrayList<String> questionUID) {
        this.questionUID = questionUID;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public boolean isDeleted() {
        return isDeleted;
    }

    public void setDeleted(boolean deleted) {
        isDeleted = deleted;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Template template = (Template) o;
        return isDeleted == template.isDeleted && Objects.equals(uid, template.uid);
    }

    @Override
    public String toString() {
        return "Template{" +
                "name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", uid='" + uid + '\'' +
                '}';
    }
}
